<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <!-- 引入vue.js -->
    <script type="text/javascript" src="../js/vue.min.js"></script>
    <link rel="stylesheet" href="../css/my-components.css" />
    <!-- 引入自定义组件文件 -->
    <script src="my/my-components.js"></script>
    <title>具名插槽</title>
  </head>
  <body>
    <div id="app">
      <page-frame title="标题" cr="@COPY前锋武汉">
        <template slot="s1">
          <div>
            <input type="text" placeholder="歌曲名、歌手" />
            <button type="button">搜索</button>
          </div>
        </template>
        <template slot="s2"  slot-scope="res">
          <div>
            <table>
              <tr>
                <th>序号</th>
                <th>歌曲ID</th>
                <th>歌曲名</th>
                <th>歌手</th>
                <th>操作</th>
              </tr>
              <tr v-for="music,index in res.musics">
                  <td>{{music.name}}</td>
              </tr>
            </table>
          </div>
        </template>
      </page-frame>
    </div>
    <script>
      var vue = new Vue({
        el: "#app",
      });
    </script>
  </body>
</html>
